package com.jy.rhin.infra.cda.dao.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jy.rhin.infra.cda.dao.SiWangYXZMDao;
import com.jy.rhin.infra.cda.mapper.SiWangYXZMMapper;
import com.jy.rhin.infra.cda.siwang.SiWangYXZMVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SiWangYXZMDaoImpl implements SiWangYXZMDao {

    @Autowired
    private SiWangYXZMMapper siWangYXZMMapper;

    @Override
    public SiWangYXZMVo getSiWangYXZMByBM(String SIWANGZH, String YEWUJGDM) {
        QueryWrapper<SiWangYXZMVo> query = new QueryWrapper<>();
        query.eq("SIWANGZH", SIWANGZH);
        query.eq("YEWUJGDM", YEWUJGDM);
        query.orderByDesc("TIANBAORQ").last("limit 1");
        return siWangYXZMMapper.getSiWangYXZM(query);
    }
}
